//
//  CheckListViewController.m
//  ZYZB
//
//  Created by ENERGY on 2018/8/27.
//  Copyright © 2018年 ENERGY. All rights reserved.
//

#import "CheckListViewController.h"

@interface CheckListViewController ()
@property (nonatomic, strong)UITableView * tableView;
@property (nonatomic, strong)UIView * topView;
@property (nonatomic, strong)UIView * middleView;
@property (nonatomic, strong)UIView * bottomView;
@property (nonatomic, strong)UIView * headerView;
@property (nonatomic, strong)UIView * bottomMoneyView;//底部栏
@property (nonatomic, strong)UILabel * payMoneyLab;//支付金额
@property (nonatomic, strong)UIButton * payBtn;
@property (nonatomic, strong)UILabel * lendContentLab;//出借金额
@property (nonatomic, strong)UILabel * lendRateContentLab;//出借率内容
@property (nonatomic, strong)UILabel * produceContentLab;//产品名称
@property (nonatomic, strong)UILabel * predictExpireContentLab;//预计到期
@property (nonatomic, strong)UILabel * bidDeadlineContentLab;//投标期限
@property (nonatomic, strong)UILabel * interestWayContentLab;//计息方式
@property (nonatomic, strong)UILabel * dueProcessContentLab;//到期处理
@property (nonatomic, strong)UILabel * orderContentLab;//订单编号
//@property (nonatomic, strong)NSString * orderID;//订单编号
@end

@implementation CheckListViewController(networking)
//userName    string    是    用户手机号
//out_serial_no    string    否    订单编号
//proId    string    是    产品id
//payMoney    string    是    支付金额
- (void)orederDoData{
    [self showprogressHUD];
    NSString * timeStr = [self currentTimeStr];
    //str
    NSDictionary * dic = @{
                           @"userName":[UserModel sharedInstanced].mobile,
                           @"proId":self.bidID,
                           @"payMoney":self.moneyNum,
                           @"t":timeStr
                           };
    //sign
    NSDictionary * signDic = @{
                               @"userName":[UserModel sharedInstanced].mobile,
                               @"proId":self.bidID,
                               @"payMoney":self.moneyNum,
                               @"t":timeStr,
                               @"merchantNo":@"80d709a97af1b8ab"
                               };
    SortMD5Code * md5Code = [[SortMD5Code alloc] init];
    NSString * jsonStr = [md5Code getJsonWithStrDic:dic withSignDic:signDic];
    NSData *postData = [jsonStr dataUsingEncoding:NSUTF8StringEncoding];
    NSURL *url = [NSURL URLWithString:@"http://120.78.157.132:82/index.php/callpay/orderDo"];
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
    //设置请求方式
    request.HTTPMethod = @"POST";
    //设置请求参数
    request.HTTPBody = postData;
    [NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse * _Nullable response, NSData * _Nullable data, NSError * _Nullable connectionError) {
        [self hiddenProgressHUD];
        if (connectionError) {
            if (connectionError.code == -1001) {
                [self.view makeToast:@"请求网络超时，请稍后再试" duration:1 position:CSToastPositionCenter];
            }
        }else{
            NSDictionary *dictionary =[NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:nil];//data解析为dictionary
            if (!dictionary) {
                NSLog(@"数据缺失");
                return;
            }
            NSString * compareMD5Str = [md5Code encodeStringWithDictionary:dictionary];
            NSString * signResult = [dictionary objectForKey:@"sign"];//接到的json串sign字段
            NSDictionary * jsonData = [md5Code getNSDictionaryData:dictionary];//解析为字典数据
            if ([jsonData[@"code"] isEqualToString:@"000000"]) {
                if ([jsonData[@"body"] count] > 0) {
//                    if ([compareMD5Str isEqualToString:signResult]) {
                    self.orderContentLab.text = [jsonData[@"body"] objectForKey:@"order_id"];
                    [self.tableView reloadData];
//                        NSLog(@"成功");
//                    }else{
//                        NSLog(@"失败");
//                        ShowMessage(jsonData[@"msg"]);
//                    }
                }else{
                    ShowMessage(jsonData[@"msg"]);
                }
            }else{
                ShowMessage(jsonData[@"msg"]);
            }
        }
    }];
}
@end
@implementation CheckListViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"确认订单";
    //返回按钮
    UIButton * backBtn = [[UIButton alloc] initWithFrame:CGRectMake(18/WIDTH_6_SCALE, 14/WIDTH_6_SCALE + 24 + 20, 24/WIDTH_6_SCALE, 30/WIDTH_6_SCALE)];
    [backBtn addTarget:self action:@selector(backBtnClick:) forControlEvents:UIControlEventTouchUpInside];
    [backBtn setImage:[UIImage imageNamed:@"out"] forState:UIControlStateNormal];
    UIBarButtonItem * leftItem = [[UIBarButtonItem alloc] initWithCustomView:backBtn];
    self.navigationItem.leftBarButtonItem = leftItem;
    self.view.backgroundColor = [UIColor whiteColor];
    
    [self setUpViews];
    if (@available(iOS 11.0, *)) {
        self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
    }else {
        self.automaticallyAdjustsScrollViewInsets = NO;
    }
    [self.view addSubview:self.tableView];
    [self.view addSubview:self.bottomMoneyView];
    
//    [self orederDoData];//网络接口
}
#pragma mark - init
- (UITableView *)tableView{
    if (!_tableView) {
        _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT - NAVI_HEIGHT - BOTTOM_HEIGHT - 50/WIDTH_6_SCALE) style:UITableViewStylePlain];
        _tableView.backgroundColor = getColor(grayBGColor);
        _tableView.tableHeaderView = self.headerView;
    }return _tableView;
}
- (void)setUpViews{
    _headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT - NAVI_HEIGHT - BOTTOM_HEIGHT)];
    _headerView.backgroundColor = getColor(grayBGColor);
    [_headerView addSubview:self.topView];
    [_headerView addSubview:self.middleView];
    [_headerView addSubview:self.bottomView];
}
- (UIView *)topView{
    if (!_topView) {
        _topView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 113/WIDTH_6_SCALE + 41/WIDTH_6_SCALE)];
        _topView.backgroundColor = [UIColor whiteColor];
        UIImageView * topColorBar = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 6/WIDTH_6_SCALE)];
        topColorBar.backgroundColor = [UIColor orangeColor];
        [_topView addSubview:topColorBar];
        //白色背景
        UIView * whiteBGView = [[UIView alloc] initWithFrame:CGRectMake(0, topColorBar.bottom, SCREEN_WIDTH, 107/WIDTH_6_SCALE + 41/WIDTH_6_SCALE)];
        whiteBGView.backgroundColor = [UIColor whiteColor];
        [_topView addSubview:whiteBGView];
        //出借标题
        UILabel * lendTitleLab = [[UILabel alloc] init];
        [self label:lendTitleLab withFont:DEF_FontSize_12 withText:@"出借金额(元)" withTextColor:[UIColor blackColor] withTextAlignment:NSTextAlignmentLeft withView:whiteBGView];
        //出借金额
        self.lendContentLab = [[UILabel alloc] init];
        [self label:self.lendContentLab withFont:DEF_FontSize_12 withText:self.moneyNum withTextColor:[UIColor orangeColor] withTextAlignment:NSTextAlignmentRight withView:whiteBGView];
        //订单编号
        UILabel * orderTitleLab = [[UILabel alloc] init];
        [self label:orderTitleLab withFont:DEF_FontSize_12 withText:@"订单编号" withTextColor:[UIColor blackColor] withTextAlignment:NSTextAlignmentLeft withView:whiteBGView];
        //订单编号内容
        self.orderContentLab = [[UILabel alloc] init];
        [self label:self.orderContentLab withFont:DEF_FontSize_12 withText:@"--" withTextColor:[UIColor orangeColor] withTextAlignment:NSTextAlignmentRight withView:whiteBGView];
        self.orderContentLab.numberOfLines = 0;
        self.orderContentLab.lineBreakMode = 0;
        //出借率标题
        UILabel * lendRateTitleLab = [[UILabel alloc] init];
        [self label:lendRateTitleLab withFont:DEF_FontSize_12 withText:@"平台建议年均出借率" withTextColor:[UIColor blackColor] withTextAlignment:NSTextAlignmentLeft withView:whiteBGView];
        //出借率内容
        self.lendRateContentLab = [[UILabel alloc] init];
        [self label:self.lendRateContentLab withFont:DEF_FontSize_12 withText:[NSString stringWithFormat:@"%.2f%%", self.lendRate] withTextColor:[UIColor orangeColor] withTextAlignment:NSTextAlignmentRight withView:whiteBGView];
        //masonry
        __weak typeof (self)weakSelf = self;
        [topColorBar mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.right.top.equalTo(weakSelf.topView);
            make.height.mas_offset(6/WIDTH_6_SCALE);
        }];
        [whiteBGView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.right.equalTo(weakSelf.topView);
            make.bottom.equalTo(weakSelf.topView.mas_bottom);
            make.top.equalTo(topColorBar.mas_bottom);
        }];
        [lendTitleLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(whiteBGView.mas_left).mas_offset(18/WIDTH_6_SCALE);
            make.top.equalTo(whiteBGView.mas_top).mas_offset(28/WIDTH_6_SCALE);
            make.height.mas_offset(15/WIDTH_6_SCALE);
        }];
        [self.lendContentLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.equalTo(weakSelf.topView.mas_right).mas_offset(-18/WIDTH_6_SCALE);
            make.top.height.equalTo(lendTitleLab);
        }];
        [lendRateTitleLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.height.equalTo(lendTitleLab);
            make.top.equalTo(lendTitleLab.mas_bottom).mas_offset(26/WIDTH_6_SCALE);
        }];
        [self.lendRateContentLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.height.equalTo(weakSelf.lendContentLab);
            make.top.equalTo(lendRateTitleLab);
        }];
        [orderTitleLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(lendTitleLab);
            make.top.equalTo(lendRateTitleLab.mas_bottom).mas_offset(26/WIDTH_6_SCALE);
        }];
        [self.orderContentLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.equalTo(weakSelf.lendRateContentLab);
            make.width.mas_offset(SCREEN_WIDTH/2 + 40/WIDTH_6_SCALE);
            make.height.mas_offset(35/WIDTH_6_SCALE);
            make.centerY.equalTo(orderTitleLab);
        }];
    }return _topView;
}
- (UIView *)middleView{
    if (!_middleView) {
        _middleView = [[UIView alloc] initWithFrame:CGRectMake(0, self.topView.bottom, SCREEN_WIDTH, 14/WIDTH_6_SCALE)];
        _middleView.backgroundColor = getColor(grayBGColor);
        //分割线
        UIView * topLineView = [[UIView alloc] init];
        topLineView.backgroundColor = getColor(grayColor);
        [_middleView addSubview:topLineView];
        UIView * bottomLineView = [[UIView alloc] init];
        bottomLineView.backgroundColor = getColor(grayColor);
        [_middleView addSubview:bottomLineView];
        __weak typeof (self)weakSelf = self;
        [topLineView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(weakSelf.middleView.mas_top);
            make.height.mas_equalTo(1/WIDTH_6_SCALE);
            make.left.right.equalTo(weakSelf.middleView);
        }];
        [bottomLineView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(weakSelf.middleView.mas_bottom).mas_offset(-1/WIDTH_6_SCALE);
            make.height.mas_equalTo(1/WIDTH_6_SCALE);
            make.left.right.equalTo(weakSelf.middleView);
        }];
    }return _middleView;
}
- (UIView *)bottomView{
    if (!_bottomView) {
        _bottomView = [[UIView alloc] initWithFrame:CGRectMake(0, self.middleView.bottom, SCREEN_WIDTH, 189/WIDTH_6_SCALE + 44/WIDTH_6_SCALE)];
        _bottomView.backgroundColor = [UIColor whiteColor];
        //我已阅读……背景
        UIView * downGrayView = [[UIView alloc] initWithFrame:CGRectMake(0, 189/WIDTH_6_SCALE, SCREEN_WIDTH, 44/WIDTH_6_SCALE)];
        downGrayView.backgroundColor = getColor(grayBGColor);
        [_bottomView addSubview:downGrayView];
        //产品名称标题
        UILabel * produceTitleLab = [[UILabel alloc] init];
        [self label:produceTitleLab withFont:DEF_FontSize_12 withText:@"产品名称" withTextColor:[UIColor blackColor] withTextAlignment:NSTextAlignmentLeft withView:_bottomView];
        //产品名称
        UILabel * produceContentLab = [[UILabel alloc] init];
        self.produceContentLab = produceContentLab;
        [self label:self.produceContentLab withFont:DEF_FontSize_12 withText:self.produceName withTextColor:[UIColor blackColor] withTextAlignment:NSTextAlignmentRight withView:_bottomView];
        //投标期限标题
        UILabel * bidDeadlineTitleLab = [[UILabel alloc] init];
        [self label:bidDeadlineTitleLab withFont:DEF_FontSize_12 withText:@"投标期限" withTextColor:[UIColor blackColor] withTextAlignment:NSTextAlignmentLeft withView:_bottomView];
        //投标期限
        UILabel * bidDeadlineContentLab = [[UILabel alloc] init];
        [self label:bidDeadlineContentLab withFont:DEF_FontSize_12 withText:self.bidLimit withTextColor:[UIColor blackColor] withTextAlignment:NSTextAlignmentRight withView:_bottomView];
        self.bidDeadlineContentLab = bidDeadlineContentLab;
        //预计到期标题
        UILabel * predictExpireTitleLab = [[UILabel alloc] init];
        [self label:predictExpireTitleLab withFont:DEF_FontSize_12 withText:@"预计到期" withTextColor:[UIColor blackColor] withTextAlignment:NSTextAlignmentLeft withView:_bottomView];
        //预计到期
        UILabel * predictExpireContentLab = [[UILabel alloc] init];
        [self label:predictExpireContentLab withFont:DEF_FontSize_12 withText:self.endData withTextColor:[UIColor blackColor] withTextAlignment:NSTextAlignmentRight withView:_bottomView];
        self.predictExpireContentLab = predictExpireContentLab;
        //计息方式标题
        UILabel * interestWayTitleLab = [[UILabel alloc] init];
        [self label:interestWayTitleLab withFont:DEF_FontSize_12 withText:@"计息方式" withTextColor:[UIColor blackColor] withTextAlignment:NSTextAlignmentLeft withView:_bottomView];
        //计息方式
        UILabel * interestWayContentLab = [[UILabel alloc] init];
        [self label:interestWayContentLab withFont:DEF_FontSize_12 withText:self.profitWay withTextColor:[UIColor blackColor] withTextAlignment:NSTextAlignmentRight withView:_bottomView];
        self.interestWayContentLab = interestWayContentLab;
        //到期处理标题
        UILabel * dueProcessTitleLab = [[UILabel alloc] init];
        [self label:dueProcessTitleLab withFont:DEF_FontSize_12 withText:@"到期处理" withTextColor:[UIColor blackColor] withTextAlignment:NSTextAlignmentLeft withView:_bottomView];
        //到期处理
        UILabel * dueProcessContentLab = [[UILabel alloc] init];
        [self label:dueProcessContentLab withFont:DEF_FontSize_12 withText:self.endDealWay withTextColor:[UIColor blackColor] withTextAlignment:NSTextAlignmentRight withView:_bottomView];
        self.dueProcessContentLab = dueProcessContentLab;
        //分割线
        UIView * bottomLineView = [[UIView alloc] init];
        bottomLineView.backgroundColor = getColor(grayColor);
        [_bottomView addSubview:bottomLineView];
        //对号框
        UIButton * checkBtn = [[UIButton alloc] init];
        [checkBtn setImage:[UIImage imageNamed:@"weigouxuan"] forState:UIControlStateNormal];
        [checkBtn setImage:[UIImage imageNamed:@"yigouxuan"] forState:UIControlStateSelected];
        [checkBtn addTarget:self action:@selector(checkBtnClick:) forControlEvents:UIControlEventTouchUpInside];
        checkBtn.userInteractionEnabled = YES;
        [downGrayView addSubview:checkBtn];
        //我已阅读
        UILabel * haveReadTitleLab = [[UILabel alloc] init];
        [self label:haveReadTitleLab withFont:DEF_FontSize_10 withText:@"我已阅读并同意" withTextColor:getColor(@"bdbdbd") withTextAlignment:NSTextAlignmentLeft withView:downGrayView];
        //福乐猪交易协议
        UIButton * agreementBtn = [[UIButton alloc] init];
        [downGrayView addSubview:agreementBtn];
        agreementBtn.titleLabel.font = DEF_FontSize_10;
        [agreementBtn setTitle:@"《福乐猪交易协议书》" forState:UIControlStateNormal];
        [agreementBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        //masonry
        __weak typeof (self)weakSelf = self;
        [produceTitleLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_offset(18/WIDTH_6_SCALE);
            make.top.equalTo(weakSelf.bottomView.mas_top).mas_offset(22/WIDTH_6_SCALE);
            make.height.mas_offset(12/WIDTH_6_SCALE);
        }];
        [self.produceContentLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.height.equalTo(produceTitleLab);
            make.right.equalTo(weakSelf.bottomView.mas_right).mas_offset(-18/WIDTH_6_SCALE);
        }];
        [bidDeadlineTitleLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(produceTitleLab.mas_bottom).mas_offset(22/WIDTH_6_SCALE);
            make.left.height.width.equalTo(produceTitleLab);
        }];
        [bidDeadlineContentLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(bidDeadlineTitleLab);
            make.left.height.right.equalTo(produceContentLab);
        }];
        [predictExpireTitleLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.height.width.equalTo(bidDeadlineTitleLab);
            make.top.equalTo(bidDeadlineTitleLab.mas_bottom).mas_offset(22/WIDTH_6_SCALE);
        }];
        [predictExpireContentLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.height.equalTo(predictExpireTitleLab);
            make.right.equalTo(bidDeadlineContentLab);
        }];
        [interestWayTitleLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(predictExpireTitleLab.mas_bottom).mas_offset(22/WIDTH_6_SCALE);
            make.left.height.width.equalTo(predictExpireTitleLab);
        }];
        [interestWayContentLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.height.equalTo(interestWayTitleLab);
            make.right.equalTo(predictExpireContentLab);
        }];
        [dueProcessTitleLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(interestWayTitleLab.mas_bottom).mas_offset(22/WIDTH_6_SCALE);
            make.left.height.width.equalTo(interestWayTitleLab);
        }];
        [dueProcessContentLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.height.equalTo(dueProcessTitleLab);
            make.right.equalTo(interestWayContentLab);
        }];
        [bottomLineView mas_makeConstraints:^(MASConstraintMaker *make) {
//            make.top.equalTo(weakSelf.bottomView.mas_bottom).mas_offset(-1/WIDTH_6_SCALE);
            make.top.mas_equalTo(weakSelf.bottomView.mas_top).mas_offset(189/WIDTH_6_SCALE);
            make.height.mas_offset(1/WIDTH_6_SCALE);
            make.left.right.equalTo(weakSelf.bottomView);
        }];
        [checkBtn mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(bottomLineView.mas_bottom).mas_offset(14/WIDTH_6_SCALE);
            make.left.equalTo(weakSelf.bottomView.mas_left).mas_offset(18/WIDTH_6_SCALE);
            make.width.height.mas_offset(20/WIDTH_6_SCALE);
        }];
        [haveReadTitleLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(checkBtn.mas_right).mas_offset(6/WIDTH_6_SCALE);
            make.centerY.equalTo(checkBtn.mas_centerY);
            make.width.mas_offset(85/WIDTH_6_SCALE);
        }];
        [agreementBtn mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(haveReadTitleLab.mas_right).mas_offset(2/WIDTH_6_SCALE);
            make.centerY.equalTo(haveReadTitleLab.mas_centerY);
            make.height.mas_offset(13/WIDTH_6_SCALE);
        }];
    }return _bottomView;
}
- (UIView *)bottomMoneyView{
    if (!_bottomMoneyView) {
        _bottomMoneyView = [[UIView alloc] initWithFrame:CGRectMake(0, SCREEN_HEIGHT - 50/WIDTH_6_SCALE - NAVI_HEIGHT - BOTTOM_HEIGHT, SCREEN_WIDTH, 50/WIDTH_6_SCALE)];
        _bottomMoneyView.backgroundColor = [UIColor whiteColor];
        //分割线
        UIView * lineView = [[UIView alloc] init];
        lineView.backgroundColor = getColor(grayColor);
        [_bottomMoneyView addSubview:lineView];
        //支付金额
        self.payMoneyLab = [[UILabel alloc] init];
        self.payMoneyLab.backgroundColor = [UIColor whiteColor];
        [self label:self.payMoneyLab withFont:DEF_FontSize_12 withText:@"确认支付金额 10000" withTextColor:[UIColor blackColor] withTextAlignment:NSTextAlignmentCenter withView:_bottomMoneyView];
        //支付按钮
        UIButton * payBtn = [[UIButton alloc] init];
        [payBtn setTitle:@"提交订单" forState:UIControlStateNormal];
        [payBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        [payBtn setBackgroundColor:[UIColor orangeColor]];
        payBtn.titleLabel.font = DEF_FontSize_12;
        [_bottomMoneyView addSubview:payBtn];
        self.payBtn = payBtn;
//        [self.payBtn addTarget:self action:@selector(payBtnClick:) forControlEvents:UIControlEventTouchUpInside];
        //masorny
        __weak typeof (self)weakSelf = self;
        [self.payMoneyLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(weakSelf.bottomMoneyView.mas_left);
            make.top.bottom.equalTo(weakSelf.bottomMoneyView);
            make.width.mas_offset(247/WIDTH_6_SCALE);
        }];
        [payBtn mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(weakSelf.payMoneyLab.mas_right);
            make.top.bottom.equalTo(weakSelf.bottomMoneyView);
            make.right.equalTo(weakSelf.bottomMoneyView);
        }];
        [lineView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.left.right.equalTo(weakSelf.bottomMoneyView);
            make.height.mas_offset(1/WIDTH_6_SCALE);
        }];
    }return _bottomMoneyView;
}
#pragma mark - action
- (void)backBtnClick:(UIButton *)sender{
    [self.navigationController popViewControllerAnimated:YES];
}
- (void)checkBtnClick:(UIButton *)sender{
    sender.selected = !sender.selected;
    NSLog(@"打勾");
}
@end
